<?php
/**
 * Created by PhpStorm.
 * User: iamya
 * Date: 2017/7/12
 * Time: 9:49
 */

namespace app\common\model;


class ShopPromotionCardOrderModel extends BaseModel
{
    protected $name = 'shop_promotion_card_order'; //定义栏目表
    //开启自动写入时间戳
    protected $autoWriteTimestamp = false;
    // 定义自动完成的属性
    protected $auto = []; //新增修改
    protected $insert = []; //插入
    protected $update = []; //修改
    protected $type = [];//类型管理

    public function getMemberNameAttr($value,$data)
    {
        $model=new UserModel();
        return $model->where('uid',$data['member_uid'])->value('username');
    }

}